package com.ruoyi.back.controller

import com.ruoyi.app.common.Data
import com.ruoyi.back.domain.AliPaySetting
import com.ruoyi.back.service.AliPaySettingService
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/system/aliPaySetting")
@Api(tags = ["系统设置-支付设置-支付宝-api"])
class AliPaySettingController {

    @Autowired
    private lateinit var aliPaySettingService: AliPaySettingService

    @ApiOperation("设置支付宝支付设置信息")
    @PostMapping("save")
    fun saveAliPaySetting(@RequestBody aliPaySetting: AliPaySetting): Data<Boolean> = aliPaySettingService.saveAliPaySetting(aliPaySetting)

    @ApiOperation("获取支付宝支付设置信息")
    @GetMapping("get")
    fun getAliPaySetting(): Data<AliPaySetting> = aliPaySettingService.getAliPaySetting()
}